exports.install = function(Vue, options) {
    //查询用户信息
    Vue.prototype.echo = function(url, id) {
        var _this = this
        console.log(url)
        console.log(this.HOST,url)
        this.$axios.get(this.HOST + url, {
                params: {
                    A001: id,
                }
            })
            .then(function(res) {
                console.log(res);
                // localStorage.setItem('data', JSON.stringify(res.data));
                sessionStorage.setItem('data', JSON.stringify(res.data));
                var personRagister = JSON.parse(localStorage.getItem('personRagister'));
                console.log(personRagister.personType)
                    //循环，判断用户填写到哪一步了。
                let data = res.data
                var active = 1
                for (var i in data) {
                    // console.log(i,data[i])
                    if (i == 'a006') {
                        data[i] ? active = 2 : '';
                    }

                    if (i == 'b002') {
                        data[i] ? active = 3 : '';
                    }

                    if (i == 'c001') {
                        data[i] ? active = 4 : '';
                    }

                    if (i == 'd001' || i == 'd003') {
                        data[i] ? active = 5 : '';
                    }

                    if (i == 'e004' || i == 'e012' || i == 'e020' || i == 'e007') {
                        data[i] ? active = 5 : '';
                    }

                }
                console.log(active)
                    // localStorage.setItem('active', active);
                sessionStorage.setItem('active', active);
            })
            .catch(function(error) {
                console.log(error);
            });
    };
    Vue.prototype.upperJSONKey = function(jsonObj) {
        for (var key in jsonObj) {
            jsonObj["\"" + key.toUpperCase() + "\""] = jsonObj[key];
            delete(jsonObj[key]);
        }
        return jsonObj;
    }
};